package br.com.ps.bombertournament.game.action;

import br.com.ps.bombertournament.game.BaseAction;
import br.com.ps.bombertournament.game.BaseGameObject;

/**
 * Remove the game object from the scene
 * 
 * @author Rennan Stefan Boni - rennanboni@gmail.com
 */
public class RemoveSceneAction extends BaseAction {
	
	@Override
	public void create() {
		// Do nothing
	}

	@Override
	public void execute(BaseGameObject owner) {
		if (owner != null && owner.getLayer() != null) {
			owner.getLayer().remove(owner);
		}
		
		super.setExecuted(true);
	}

	@Override
	public void undo(BaseGameObject owner) {
		// Do nothing
	}
}
